1. Field of the Invention
Embodiments of the present invention relate generally to graphics processing and, more specifically, to managing per-tile event count reports in a tile-based architecture.
2. Description of the Related Art
In typical operation, a graphics processing pipeline may be directed to provide a count of the number of occurrences of a certain event. For example, the graphics processing pipeline may be directed to record the number of pixels that pass a z-test or the number of pixels for which a specified operation is performed in the pixel shader. Such counts may be useful to an application, which may condition certain work on such counts. For example, certain rendering operations may be conditioned on the count associated with a “z-pass pixel test.” In such an implementation, those rendering operations are performed only after the number of pixels that pass a z-test exceeds a certain threshold value.
Some graphics subsystems implement a tiling architecture, where one or more render targets, such as a frame buffer, are divided into screen space partitions referred to as “tiles.” In such a tiling architecture, the graphics subsystem rearranges work such that the work associated with any particular tile remains in an on-chip cache for a longer time relative to architectures that do not rearrange work in this manner. This rearrangement helps to improve memory bandwidth as compared with non-tiling architectures.
In graphics subsystems that implement a tiling architecture and re-order work, the event counts discussed above may not provide the desired results. More specifically, because the work is re-ordered, the mechanisms that record the requested counts may record incorrect numbers. For example, a first set of work and a second set of work could be divided into several subsets, where each subset is associated with a different tile. The several subsets of work would then be interleaved. If a count request were to request an event count associated with the first set of work, then the result would not be what is desired or quested. The result would not be what is desired because when the first set of work and second set of work were interleaved, the count request would include values associated with both the first set of work and the second set of work.
As the foregoing illustrates, what is needed in the art is a more effective technique for counting event occurrences in a tile-based architecture.